#include <stdio.h>

#include "YJUI.h"
#include "binder.h"
/*
 * binder.cpp
 *
 *  Created on: Dec 2, 2010
 *      Author: pavel
 */
extern "C" void print() {
	printf("native: print from cpp\n");

}

extern "C" void create_jui(top_constructor_callback c){
	YJUI::set_constructor_callback(c);
}

extern "C" void create_widget_factory(constructor_callback c) {
	YJUI::set_widget_factory(c);
}
extern "C" void create_optional_widget_factory(constructor_callback c){
	YJUI::set_optional_widget_factory(c);
}
extern "C" void create_application(constructor_callback c){
	YJUI::set_application(c);
}

extern "C" int test_c_java_bindings(){
	int reti=0;
	int test=0;
	test = YJUI::test();
	if(test!=0){
		printf("n: YJUI test failed\n");
		reti+=test;
	}else{
		printf("n: test passed");
	}
	return reti;
}

extern "C" void dialog_constructor(ydialog_constructor_callback c){
        YJDialog::constructor_cb=c;
}
extern "C" void dialog_activate(simple_callback c){
        YJDialog::activate_cb=c;
}
extern "C" void open_internal(simple_callback c){
        YJDialog::open_internal=c;
}

extern "C" void label_constructor(yjlabel_constructor_callback c){
        YJLabel::constructor_callback=c;
}

extern "C" void label_preffered_height(simple_callback_int_return c){
        YJLabel::preffered_height=c;
}
extern "C" void label_preffered_width(simple_callback_int_return c){
        YJLabel::preffered_width=c;
}
extern "C" void label_set_size(yjlabel_set_size_callback c){
        YJLabel::set_size=c;
}


//virtual YJOptionalWidgetFactory *createOptionalWidgetFactory();
//virtual YJApplication *createApplication();

